const state = {}

const mutations = {
  set_state: (state, data) => {
    for (const key in data) {
      state[key] = data[key]
    }
  },
}

const actions = {
  login({ commit }, data) {
    setTimeout(async function () {
      await commit('set_state', data)
    }, 1000)
  },
}

export default {
  state,
  mutations,
  actions,
}
